#pragma once
#include "LightBase.h"

ref class PointLight : public LightBase
{
internal:
	PointLight(void);

	virtual void Initialize(ID3D11PixelShader* pixelShader, ID3D11Buffer* lightParametersBuffer, ID3D11Buffer* pointLightDetailsBuffer) override;

	void LightPosition(float x, float y, float z);
	DirectX::XMFLOAT3 LightPosition(void);

	void LightRange(float range);
	float LightRange(void);

	virtual void Render(ID3D11DeviceContext* context, UINT indexCount = 6, UINT startIndexLocation = 0, UINT baseVertexLocation = 0) override;

	virtual float GetDepthForSorting(const DirectX::XMFLOAT4X4& viewMatrix) override;

protected private:
	DirectX::XMFLOAT4							m_lightPositionAndRange;
	Microsoft::WRL::ComPtr<ID3D11Buffer>		m_pointLightDetailsBuffer;

private:
	bool										m_updateRequired;
};

